#pragma once
#include <string>
#include "help_api.h"

using namespace std;

class MemoryMappedFile {
    private:
        string temp_filename;
        uint file_size;
        int fd;
        void* map;
        uint address;
        int open_temp_file();
        void init(int fd,uint file_size, uint address);
        bool deleteAfterUse;
    public:
        MemoryMappedFile(uint file_size, uint address);
        MemoryMappedFile(string filename, uint file_size, uint address, bool deleteAfterUse);
        ~MemoryMappedFile();
};